package com.zxian.studentmanager.bean;


import java.util.ArrayList;
import java.util.Scanner;

public class zhan01 {
    Scanner scanner=new Scanner(System.in);
    ArrayList<zhan01> studentList =new ArrayList<zhan01>();

    public void printStudent(){

        for (int i = 0; i < studentList.size(); i++) {
            zhan01 student = studentList.get(i);
//            System.out.println(zhan01.getname() + "---" + zhan01.getAge());
        }
    }

    public void add() {
        System.out.println("请输入学生姓名:");
        String name = scanner.next();
        System.out.println("请输入学生的年龄:");
        int age = scanner.nextInt();
        zhan01 student = new zhan01();
//        student.(name);
//        student.(age);
        studentList.add(student);
    }

    }




